﻿using System;

namespace TallComponents.Web.Pdf
{
   /// <summary>
   /// Information about a PDF document.
   /// </summary>
   [Serializable]
   public sealed class DocumentInfo
   {
      /// <summary>
      /// Initializes a new instance of the <see cref="DocumentInfo"/> class.
      /// </summary>
      /// <param name="title">The title.</param>
      /// <param name="subject">The subject.</param>
      /// <param name="keywords">The keywords.</param>
      /// <param name="author">The author.</param>
      /// <param name="creator">The creator.</param>
      /// <param name="key">The storage key.</param>
      /// <param name="pageCount">The page count.</param>
      /// <param name="fileName">Name of the file.</param>
      internal DocumentInfo( string title, string subject, string keywords, string author, string creator, string key, int pageCount, string fileName )
      {
         Title = title;
         Subject = subject;
         Keywords = keywords;
         Author = author;
         Creator = creator;
         Key = key;
         PageCount = pageCount;
         FileName = fileName;
      }

      /// <summary>
      /// Gets the title of this document.
      /// </summary>
      /// <value>The title of this document.</value>
      public string Title { get; private set; }
      /// <summary>
      /// Gets the subject of this document.
      /// </summary>
      /// <value>The subject of this document.</value>
      public string Subject { get; private set; }
      /// <summary>
      /// Gets the keywords of this document.
      /// </summary>
      /// <value>The keywords of this document.</value>
      public string Keywords { get; private set; }
      /// <summary>
      /// Gets the name of the person who authored this document.
      /// </summary>
      /// <value>The name of the person who authored this document.</value>
      public string Author { get; private set; }
      /// <summary>
      /// Gets the name of the application that created this document. 
      /// </summary>
      /// <value>The name of the application that created this document.</value>
      public string Creator { get; private set; }
      /// <summary>
      /// Gets or sets the key used to retrieve this document from storage.
      /// </summary>
      /// <value>The key.</value>
      public string Key { get; private set; }
      /// <summary>
      /// Gets or sets the number of pages in the document.
      /// </summary>
      /// <value>The page count.</value>
      public int PageCount { get; private set; }
      /// <summary>
      /// Gets or sets the name of the file.
      /// </summary>
      /// <value>The name of the file.</value>
      public string FileName { get; private set; }
   }
}
